<?php
    $textHTML = "";
    $textHTML .= "<div id='frmConnect'>";

    $textForm = new Form("connexion", "index.php?controleur=Connexion&action=seConnecter", "POST");
    $textForm->addLegend("Login");
    $textForm->addInput(InputType::TEXT, "login", "login");

    $textForm->addLegend("Password");
    $textForm->addInput(InputType::PASSWORD, "password", "password");

    $textForm->addInput(InputType::SUBMIT, "valider", "valider", "VALIDER");

    $textHTML .= $textForm;

    echo $textHTML;

    if (!empty($_SESSION['errors'])){
        foreach ($_SESSION['errors'] as $error){
            echo "<p id='errorMsg'>" . $error . '</p><br />';
        }
    }
    echo "</div>";
?>